<?php
include_once ("annotation.php");

$title = $_GET['title'];
$time = intval($_GET['time']);
$content = $_GET['content'];
$shared = ($_GET['shared']=='true')?1:0;
$idVideo = $_GET['idVideo'];
$editable = ($_GET['editable']=='true')?1:0;
$idUser = $_GET['idUser'];
$annot = new annotation();

//Create and store the ewiki page
if (isset($editable)) {
	$success = $annot -> addAnnotation($idUser, $title, $content, $idVideo, $time, $shared, $editable);
} else {
	$success = $annot -> addAnnotation($idUser,  $title, $content, $idVideo, $time, $shared, 1);
}
echo "$success";
?>